package com.bw.controller;

import com.bw.bean.Vo;
import com.bw.service.VoService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class AppController {


    @Autowired
    VoService voService;

    @RequestMapping(  "list1")
    public Map getList1(){
        Double val=voService.getList1();

        return SugarUtil.getFlipNumberData(val);
    }

    @RequestMapping(  "list2")
    public Map getList2(){
        List<Vo> list =voService.getList2();

        return SugarUtil.getMapData(list);
    }



    @RequestMapping(  "list3")
    public Map getList3(){
        List<Vo> list =voService.getList3();

        return SugarUtil.getBarData(list);
    }


    @RequestMapping(  "list4")
    public Map getList4(){
        List<Vo> list =voService.getList4();

        return SugarUtil.getBarData(list);
    }

    @RequestMapping(  "list5")
    public Map getList5(){
        List<Vo> list =voService.getList5();

        return SugarUtil.getBarData(list);
    }

    @RequestMapping(  "list6")
    public Map getList6(){
        List<Vo> list =voService.getList6();

        return SugarUtil.getBarData(list);
    }

    @RequestMapping(  "list7")
    public Map getList7(){
        List<Vo> list =voService.getList7();

        return SugarUtil.getBarData(list);
    }








}
